package com.ruoyi.bigScreen.controller;

import com.ruoyi.bigScreen.service.IBigScreenAnnualTaskProgressService;
import com.ruoyi.common.core.domain.business.waterDistribution.AnnualTaskProgress;
import com.ruoyi.common.core.utils.poi.ExcelUtil;
import com.ruoyi.common.core.web.controller.BaseController;
import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.common.core.web.page.TableDataInfo;
import com.ruoyi.common.log.annotation.Log;
import com.ruoyi.common.log.enums.BusinessType;
import com.ruoyi.common.security.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletResponse;
import java.util.Calendar;
import java.util.List;

/**
 * 水利服务站站年度任务进度Controller
 *
 * @author hwd
 * @date 2023-07-14
 */
@RestController
@RequestMapping("/AnnualTaskProgress")
public class BigScreenAnnualTaskProgressController extends BaseController
{
    @Autowired
    private IBigScreenAnnualTaskProgressService annualTaskProgressService;

//    /**
//     * 查询水利服务站站年度任务进度列表
//     */
//    @RequiresPermissions("waterDistribution:AnnualTaskProgress:list")
//    @GetMapping("/list")
//    public TableDataInfo list(AnnualTaskProgress annualTaskProgress)
//    {
//        startPage();
//        List<AnnualTaskProgress> list = annualTaskProgressService.selectAnnualTaskProgressList(annualTaskProgress);
//        return getDataTable(list);
//    }

    /**
     * 查询水利服务站站年度任务进度列表
     */
    @RequiresPermissions("waterDistribution:AnnualTaskProgress:list")
    @GetMapping("/listOrgWaterFeeCollectionRate")
    public TableDataInfo listOrgWaterFeeCollectionRate(AnnualTaskProgress annualTaskProgress)
    {
//        Calendar calendar = Calendar.getInstance();
//        //获取当前年
//        int year =calendar.get(Calendar.YEAR);
//        //获取当前月
//        int month = calendar.get(Calendar.MONTH) + 1;
//        String months =month > 10 ? String.valueOf(month) : "0" + month;
//        String years =year+months;
//        annualTaskProgress.setYearMon(years);
        List<AnnualTaskProgress> list = annualTaskProgressService.selectAnnualTaskProgressList(annualTaskProgress);
        return getDataTable(list);
    }


}
